class RequestResult:
    # 成功方法
    @staticmethod
    def success(data):
        res = dict()
        res['code'] = 200
        res['message'] = '操作成功'
        res['data'] = data
        return res

    # 失败方法
    @staticmethod
    def error(code, message):
        res = dict()
        res['code'] = code
        res['message'] = message
        res['data'] = None
        return res
